<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'AddAddress.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="/sbm/css/screen.css" rel="stylesheet" type="text/css">

<script language="javascript">
	function mycheck(){           
		if(myform.account.value != ""){         
			if(myform.fare.value == 0.0 ){         
				alert("费用不能为空！");
				myform.fare.focus();
				return false;
			} else(myform.fare.value < 0.0 ){
				alert("费用不能为负数！");
				myform.fare.focus();
				return false;
			} ;     
		};
};
</script>

</head>

<body>
	<s:form action="addcheckin" method="post" enctype="multipart/form-data"
		name="myform">
		<table width="600px" align="center" class="class1">
			<tr>
				<td colspan="3" align="right"><span class="title">新增一个入仓记录</span>
				</td>
			</tr>
			<tr>
				<td width="10%">&nbsp;</td>
				<td>
					<table>
						<tr>
							<td width="30%" height="38" align="left">选择货物</td>
							<td><s:select list="itemlist" listValue="name"
									headerValue="请选择" headerKey="-1" listKey="itemid"
									value="name" name="itemid" id="name"></s:select></td>
						<tr>
						<tr>
							<td align="left">选择地址</td>
							<td><s:select list="addlist" listValue="name"
									headerValue="请选择" headerKey="-1" listKey="adsid"
									value="name" name="adsid" id="name"></s:select>
							</td>
						<tr>
						<tr>
							<td align="left">单位价值</td>
							<td><s:textfield name="check.unitcost" />
							</td>
						<tr>
						<tr>
							<td align="left">数量</td>
							<td><s:textfield name="check.qty" />
							</td>
						<tr>
						<tr>
							<td colspan="2">若需要进行成本核算，请填写以下内容</td>
						</tr>
						<tr>
							<td align="left">费用类型</td>
							<td><s:textfield name="check.account" id="account"/>
							</td>
						</tr>
						<tr>
							<td align="left">费用</td>
							<td><s:textfield name="check.fare" id="fare" value="0.0"/>元
							</td>
						</tr>
						
					</table></td>
				<td width="20%">&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;<input name="Submit" type="submit"
					value="确 认" onClick="return mycheck()" />
				</td>
			</tr>
			<tr>
				<td height="35" colspan="2" class="top_hui_text" align="center"
					colspan="2"><span class="errorAndmes"><s:actionerror
							cssStyle="font-family: Arial,Helvetica,sans-serif" /> </span>
				</td>
			</tr>
		</table>
	</s:form>
</body>
</html>
